package cn.bb.bbstudy.service.impl;

import cn.bb.bbstudy.dao.DownloadDAO;
import cn.bb.bbstudy.pojo.Download;
import cn.bb.bbstudy.service.DownloadService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class DownloadServiceImpl implements DownloadService{

    @Resource
    private DownloadDAO downloadDAO;

    @Override
    public int insert(Download record) {
        return downloadDAO.insert(record);
    }

    @Override
    public int insertSelective(Download record) {
        return downloadDAO.insertSelective(record);
    }

    public List<Download> selectAllDesc() {
        return downloadDAO.selectAllDesc();
    }
}
